import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
// import  from ''

const routes = [{
		path: '/',
		name: 'Login',
		hidden:true,
		meta: {
			title: '登录'
		},
		component: () => import('views/acount/login.vue') //根据情况是否添加--跟webpack有关  /* webpackChunkName: "about" */ 
	},
	{
		path: '/register',
		name: 'Register',
		hidden:true,
		meta: {
			title: '注册'
		},
		component: () => import('views/acount/register.vue')
	},
	{
		path: '/forget',
		name: 'Forget',
		hidden:true,
		meta: {
			title: '重置密码'
		},
		component: () => import('views/acount/forget.vue')
	},
	// 后台首页
	{
		path: '/home',
		name: 'Home',
		meta: {
			title: '首页',
			// icon:'icon-aside-home' 这是之前png的
			icon:'home'
			
		},
		hidden:false,
		component: () => import('views/layout/Index.vue')
	},
	{
		path: '/adminIndex',
		meta: {
			title: '管理总台',
			// icon:'icon-aside-console',
			icon:'console'
			
		},
		name: 'AdminIndex',
		component: () => import('views/layout/Index.vue'),
		children: [
			{
				path: '/role',
				name: 'Role',
				component: () => import('views/admin/Role.vue'),
				meta: {
					title: '角色管理'
				}
			},
			{
				path: '/usr',
				name: 'User',
				component: () => import('views/admin/User.vue'),
				meta: {
					title: '用户列表'
				}
			},
			{
				path: '/menu',
				name: 'menu',
				component: () => import('views/admin/User.vue'),
				meta: {
					title: '菜单管理'
				}
			}
		]
	},
	{
		path: '/info',
		name: 'Info',
		hidden:false,
		meta: {
			title: '信息管理',
			// icon:'icon-aside-informtion'
			icon:'informtion'
		},
		component: () => import('views/layout/Index.vue')
	},
	{
		path: '/product',
		name: 'Product',
		hidden:false,
		meta: {
			title: '产品管理',
			// icon:'icon-aside-product',
			icon:'product'
		},
		component: () => import('views/layout/Index.vue')
	},
	{
		path: '/member',
		name: 'Member',
		hidden:false,
		meta: {
			title: '会员管理',
			// icon:'icon-aside-user',
			icon:'huiyuan'
		},
		component: () => import('views/layout/Index.vue')
	},
]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router
